<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <h1>TEST call</h1>

    <script>
        var obj1 = {
            name: 'seven',
            getName: function () {
                return this.name
            }
        }
        var obj2 = {
            name: 'anna'
        }
        console.log(obj1.name);  //输出结果是seven
        console.log(obj1.getName.call(obj2));  //输出结果是anna 使用的是obj1对象上的方法 但是输出的结果却是obj2对象上的name 
    </script>

</body>

</html>